<me:UIJOB x:Class="WPFExcelReport.XSJobBar"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
            xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"  
             mc:Ignorable="d" 
            xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"    
             xmlns:me="clr-namespace:WPFExcelReport"
           xmlns:AF="clr-namespace:WPFExcelReport;assembly=TABFOLGE" 
            x:Name="TV"
             >
    <me:UIJOB.Resources>
        <ucd:BoolToVisibilityConverter x:Key="bv"/>
        <ucd:SubStrConverter x:Key="substr"/>
        <ucd:Divideby1000 x:Key="d1000"/>
        <ucd:EearlyEndGrade x:Key="edc"/>
    </me:UIJOB.Resources>
    <!--BorderThickness="2,0,2,2" 左上右下-->
    <Border    x:Name="border" ToolTip="{Binding DES,ElementName=TV}"
                           BorderBrush="DarkGray" BorderThickness=".0,.0,2,2" CornerRadius="0"  >
        <Border BorderBrush="White" BorderThickness="2" CornerRadius="3" >
            <Border.Background>
                <SolidColorBrush Color="{Binding JP12,Converter={StaticResource ResourceKey=edc}}"></SolidColorBrush>
            </Border.Background>
            <Border BorderBrush="Black" BorderThickness=".5" CornerRadius="3"  >
                <Border.Background>
                    <SolidColorBrush Color="{Binding JobColor}"></SolidColorBrush>
                </Border.Background>
                <Grid Name="MGrid">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="5"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock  Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Visibility="Collapsed"
                            Text="{Binding Path=MKFPLTIME,Converter={StaticResource substr}, ConverterParameter=0+2}" Width="Auto"  />
                    
                    <WrapPanel Grid.Row="0"  Grid.Column="3"   Grid.ColumnSpan="9999"> 
                        <Image   Source="/ImagePackage;Images/star-alt-icon.png" Width="24" Height="20"
                                 Visibility="{Binding IsHit,ElementName=TV,Converter={StaticResource ResourceKey=bv}}"
                            Stretch="Uniform"
                            />
                        <TextBlock Text="{Binding DES,ElementName=TV}" Width="Auto" Name="cDES"/>
                    </WrapPanel>
                    <WrapPanel Grid.Row="1"  Grid.Column="1"     Grid.ColumnSpan="30">
                        <TextBlock  Grid.Row="1" 
                            Text="{Binding Path=ENDTIME,Converter={StaticResource substr}, ConverterParameter=0+2}" Width="Auto"  />
                        <TextBlock  Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2"
                             Text="{Binding Path=JP12}" Width="Auto" >
                            <TextBlock.Background>
                                <SolidColorBrush Color="{Binding JP12,Converter={StaticResource ResourceKey=edc}}"></SolidColorBrush>
                            </TextBlock.Background>
                        </TextBlock>
                    </WrapPanel>
                    
                </Grid>
            </Border>
        </Border>
    </Border>
   
</me:UIJOB>
